/* 前台模块 */
const express = require('express');
const router = express.Router();
/* 引入数据库模块 */
const webSiteModule = require('../modules/website');

router.get('/', (req, res) => {
    res.render('front/index1');
});

// 联系模块
router.get('/contact', async(req, res) => {
    const info = await webSiteModule.findOne();
    if (info) {
        res.render('front/index6', { info });
    } else {
        res.render('front/index6', { info: {} });
    }
});

module.exports = router;